home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1 Issue 2
/
PDCD-1 - Issue 02.iso
/
_utilities
/
utilities
/
001
/
specialc
/
!ReadMe
next >
Wrap
Text File
|
1994-10-18
|
6KB
|
149 lines
Special Case Module release 0.04
================================
*** Source, binaries and documentation Copyright (C) Oliver Betts, 1994 ***
This software is provided as is. It has been tested to a reasonable extent,
but probably has a few lurking bugs. I take no responsibility for any loss
or damage, directly or indirectly caused.
Versions with a letter suffix are test versions and may only be distributed
with express permission from me. Other versions may be distributed freely
provided all files are supplied intact and that no profit is made. You may
bundle it with other freeware software provided these distribution
restrictions are met, but please make sure you're supplying the latest
version. If you want to distribute it in some other way, get in touch.
*****************************************************************************
DOSFS and CDFS allow filenames in capital letters only, which doesn't make
for readability. This cunning module sits on the vector used by the Filer
to read filenames and does on-the-fly translation of the case of filenames
containing no lower-case letters. And as a bonus, it also tells the Filer
that directories have timestamps at the beginning or end of time, and this
means they all get listed first or last under "Sort by date".
Files in this release:
!ReadMe - this file
SpeclCase - the module
CaseSrc - source code
The case translation is applied to any filename not containing lower-case
letters, which means that any files which you've previously copied from a
DOS floppy onto your harddisc get translated too. Since the Wimp is told
the filename has mixed-case, if you copy a file from a DOS floppy to your
harddisc with the module loaded, the filename on your harddisc will be in
mixed-case even if you don't load the module.
The translation applied is as follows:
* If the file contains lower-case letters, no translation is done
* A single character leafname is forced to lower-case
* Any leading '!'s are skipped
* The start of the filename is checked for matches with list of words and
if a match is found, the rest of the string is checked for matches with
the word list recursively. If any match is found, the rest of the name
is forced to lower case
* Otherwise, all letters are forced to lower-case, except for the initial
non-'!' character
The word list can be changed by editing the DATA statements at the end of
the BASIC assembler source code and RUNning it. This will reassemble the
module in the current directory.
Make sure that any words which are prefixes of other words come after the
words which they are prefixes of (eg. 'Desktop' needs to be before 'Desk'
or it won't ever get used). If you simply sort the words into decreasing
length order you will avoid any problems.
Let me know if you find any useful words which aren't in the list.
So for example:
HELLo -> HELLo
C -> c
TMP -> Tmp
!X -> !X
!RUNIMAGE -> !RunImage (if 'Run' and 'Image' are in the word list)
!!BANG!! -> !!Bang!! (0.01 gave !!bang!!)
!RUNFILES -> !RunFiles (if 'Run' and 'File' are in the word list)
This scheme is arguably not perfect -- please let me know if you think of
any improvements.
A minor technical note: the module translates the information returned by
calls to OS_GBPB with R0=8,9,10,11 or 12. The Filer uses R0=10 (at least
in RISC OS 3.5 it does). This means that the case translation also works
with filename completion (at least it does for my LineEditor module).
Directory timestamps:
As a bonus, the returned timestamps for directories are set to either the
earliest or latest time possible. If like me, you use the "Sort by date"
option this gives directories listed alphabetically after or before files
in filer windows. This demonstrates a minor bug in the RISC OS 3.5 filer
which displays the latest possible time as "00:59:59 01 Jan 1900" when it
should be sometime next century. The dates sort correctly, though. This
bug isn't present in RISC OS 3.11!
Hopefully this timestamp fudging will not foul-up Impression Style, which
I have heard complains if the timestamp of the !System directory changes.
I'd be interested to hear if it does or doesn't work.
Comments and suggestions are greatly encouraged. E-mail will get a reply
(assuming I can get through) somewhat quicker than snail mail. If e-mail
bounces, I read the usenet group comp.sys.acorn regularly. Please try to
give as much detail as possible in bug-reports. Steps to demonstrate the
bug from loading in the module are very helpful indeed.
Several people have requested that the case translation be restictable by
filing system. I'll probably add this fairly soon.
Version 0.01 has been tested on RISC OS 3.11 and 3.50.
Versions 0.02, 0.03 and 0.04 have been tested on RISC OS 3.50.
However, I can't see why they shouldn't work on any RISC OS version. Let
me know of any problems.
Olly Betts, 1994.10.17
You can fetch the latest version using anon ftp from ftp.mantis.co.uk, in
the directory /pub/users/olly - the file should be scase???.arc
I'll also upload it to HENSA when it's in a reasonable unchanging state.
If you can't ftp send me an e-mail with "req-spcase" in the subject line,
and my mailer will automagically mail you the latest version, uuencoded.
Internet email: olly@mantis.co.uk
Indirected snail mail: Olly Betts,
24 Morgans Road,
Hertford,
Herts,
SG13 8BS,
UK
Revision History:
=================
0.04 Fixed erroneous special casing of filenames containing lower-case, but
starting with a word in the list
You can now turn off the directory sorting (assembly-time flag)
You can now capitalise the tail of the name left after matching words
from the list (so SPRITEFRED -> SpriteFred, but SPRITELY -> SpriteLy)
Extended word list
0.03 No longer attempts to postprocess returned data on error from OS_GBPB
(Julian Wright spotted this bug and provided the fix -- Thanks)
Extended word list
0.02 Added word list
0.01 First version